<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>usb: xusb_microphone.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">usb
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xusb__microphone_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xusb_microphone.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains the constants, type definitions, variables and function prototypes used in the usb microphone application. </p>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.00a hvm  12/20/10 First release
4.02a bss  02/20/12 Modified to include Little Endian and
                        Big Endian descriptors.</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a60c0c84fbef56ee0649395ebb54ada9c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__microphone_8h.html#a60c0c84fbef56ee0649395ebb54ada9c">EP_CONTROL</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:a60c0c84fbef56ee0649395ebb54ada9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Control Endpoint.  <a href="#a60c0c84fbef56ee0649395ebb54ada9c">More...</a><br/></td></tr>
<tr class="separator:a60c0c84fbef56ee0649395ebb54ada9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5404e7fddbfb9268eec114f26cf4048"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__microphone_8h.html#af5404e7fddbfb9268eec114f26cf4048">EP_ISOCHRONOUS</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:af5404e7fddbfb9268eec114f26cf4048"><td class="mdescLeft">&#160;</td><td class="mdescRight">Isochronous Endpoint.  <a href="#af5404e7fddbfb9268eec114f26cf4048">More...</a><br/></td></tr>
<tr class="separator:af5404e7fddbfb9268eec114f26cf4048"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39a66d6d78275fe2e860553377ab05dd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__microphone_8h.html#a39a66d6d78275fe2e860553377ab05dd">EP_BULK</a>&#160;&#160;&#160;2</td></tr>
<tr class="memdesc:a39a66d6d78275fe2e860553377ab05dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bulk Endpoint.  <a href="#a39a66d6d78275fe2e860553377ab05dd">More...</a><br/></td></tr>
<tr class="separator:a39a66d6d78275fe2e860553377ab05dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4d26e1c566064f2259faf65f0858b6e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__microphone_8h.html#ad4d26e1c566064f2259faf65f0858b6e">EP_INTERRUPT</a>&#160;&#160;&#160;3</td></tr>
<tr class="memdesc:ad4d26e1c566064f2259faf65f0858b6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interrupt Endpoint.  <a href="#ad4d26e1c566064f2259faf65f0858b6e">More...</a><br/></td></tr>
<tr class="separator:ad4d26e1c566064f2259faf65f0858b6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3b40155d0d9fa44133905dd9f6f02ee7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__microphone_8h.html#a3b40155d0d9fa44133905dd9f6f02ee7">InitUsbInterface</a> (<a class="el" href="struct_x_usb.html">XUsb</a> *InstancePtr)</td></tr>
<tr class="memdesc:a3b40155d0d9fa44133905dd9f6f02ee7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the USB initialization function.  <a href="#a3b40155d0d9fa44133905dd9f6f02ee7">More...</a><br/></td></tr>
<tr class="separator:a3b40155d0d9fa44133905dd9f6f02ee7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8bd3ecc4e2acd07b864ea2392a0394f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__microphone_8h.html#a8bd3ecc4e2acd07b864ea2392a0394f4">UsbIfIntrHandler</a> (void *CallBackRef, u32 IntrStatus)</td></tr>
<tr class="memdesc:a8bd3ecc4e2acd07b864ea2392a0394f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the interrupt handler for the USB mass storage device application.  <a href="#a8bd3ecc4e2acd07b864ea2392a0394f4">More...</a><br/></td></tr>
<tr class="separator:a8bd3ecc4e2acd07b864ea2392a0394f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a243967b329b332dc3503adfc2950fceb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__microphone_8h.html#a243967b329b332dc3503adfc2950fceb">Ep0IntrHandler</a> (void *CallBackRef, u8 EpNum, u32 IntrStatus)</td></tr>
<tr class="memdesc:a243967b329b332dc3503adfc2950fceb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the interrupt handler for the USB End point Zero events.  <a href="#a243967b329b332dc3503adfc2950fceb">More...</a><br/></td></tr>
<tr class="separator:a243967b329b332dc3503adfc2950fceb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a386bfc503aaebdfd92028284d6fb63f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__microphone_8h.html#a386bfc503aaebdfd92028284d6fb63f0">Ep1IntrHandler</a> (void *CallBackRef, u8 EpNum, u32 IntrStatus)</td></tr>
<tr class="memdesc:a386bfc503aaebdfd92028284d6fb63f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the interrupt handler for the USB End point one events.  <a href="#a386bfc503aaebdfd92028284d6fb63f0">More...</a><br/></td></tr>
<tr class="separator:a386bfc503aaebdfd92028284d6fb63f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a39a66d6d78275fe2e860553377ab05dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define EP_BULK&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bulk Endpoint. </p>

</div>
</div>
<a class="anchor" id="a60c0c84fbef56ee0649395ebb54ada9c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define EP_CONTROL&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Control Endpoint. </p>

</div>
</div>
<a class="anchor" id="ad4d26e1c566064f2259faf65f0858b6e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define EP_INTERRUPT&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Interrupt Endpoint. </p>

</div>
</div>
<a class="anchor" id="af5404e7fddbfb9268eec114f26cf4048"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define EP_ISOCHRONOUS&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Isochronous Endpoint. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a243967b329b332dc3503adfc2950fceb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Ep0IntrHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CallBackRef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>EpNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>IntrStatus</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the interrupt handler for the USB End point Zero events. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is the callback reference passed from the interrupt. handler, which in our case is a pointer to the driver instance. </td></tr>
    <tr><td class="paramname">EpNum</td><td>is the end point number. </td></tr>
    <tr><td class="paramname">IntrStatus</td><td>is a bit mask indicating pending interrupts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>EpNum is not used in this function as the handler is attached specific to end point zero. This parameter is useful when a single handler is used for processing all end point interrupts.</dd></dl>
<p>This function is the interrupt handler for the USB End point Zero events.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is the callback reference passed from the caller function, which in our case is a pointer to the driver instance. </td></tr>
    <tr><td class="paramname">EpNum</td><td>is the end point number. </td></tr>
    <tr><td class="paramname">IntrStatus</td><td>is a bit mask indicating pending interrupts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>EpNum is not used in this function as the handler is attached specific to end point zero. This parameter is useful when a single handler is used for processing all end point interrupts. </dd></dl>

</div>
</div>
<a class="anchor" id="a386bfc503aaebdfd92028284d6fb63f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Ep1IntrHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CallBackRef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>EpNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>IntrStatus</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the interrupt handler for the USB End point one events. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is the callback reference passed from the interrupt handler, which in our case is a pointer to the driver instance. </td></tr>
    <tr><td class="paramname">EpNum</td><td>is the end point number. </td></tr>
    <tr><td class="paramname">IntrStatus</td><td>is a bit mask indicating pending interrupts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>EpNum is not used in this function as the handler is attached specific to end point one. This parameter is useful when a single handler is used for processing all end point interrupts.</dd></dl>
<p>This function is the interrupt handler for the USB End point one events.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is the callback reference passed from the caller function, which in our case is a pointer to the driver instance. </td></tr>
    <tr><td class="paramname">IntrStatus</td><td>is a bit mask indicating pending interrupts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>EpNum is not used in this function as the handler is attached specific to end point one. This parameter is useful when a single handler is used for processing all end point interrupts. </dd></dl>

</div>
</div>
<a class="anchor" id="a3b40155d0d9fa44133905dd9f6f02ee7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void InitUsbInterface </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_usb.html">XUsb</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the USB initialization function. </p>
<p>This example initializes the device for Mass Storage Application. The following configuration is done.</p>
<ul>
<li>EP0 : CONTROL end point, Bidirectional, Packet size 64 bytes.</li>
<li>EP1 : NON_ISOCHRONOUS, BULK_IN, packet size 512 bytes.</li>
<li>EP2 : NON_ISOCHRONOUS, BULK_OUT, packet size 512 bytes</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> instance.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<p>This is the USB initialization function.</p>
<p>The following is the configuration.</p>
<ul>
<li>EP0 : CONTROL end point, Bidirectional, Packet size 64 bytes.</li>
<li>EP1 : NON_ISOCHRONOUS, INTERRUPT_IN, packet size of 16 bytes.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> instance.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<p>This example initializes the device for Microphone Application. The following configuration is done.</p>
<ul>
<li>EP0 : CONTROL end point, Bidirectional, Packet size 64 bytes.</li>
<li>EP1 : ISOCHRONOUS, BULK_IN, packet size 1024 bytes.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> instance.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<p>This example initializes the USB device for USB mouse example. The following configuration is done.</p>
<ul>
<li>EP0 : CONTROL end point, Bidirectional, Packet size 64 bytes.</li>
<li>EP1 : NON_ISOCHRONOUS, INTERRUPT_IN, packet size of 16 bytes.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_usb.html" title="The XUsb driver instance data. ">XUsb</a> instance.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a class="anchor" id="a8bd3ecc4e2acd07b864ea2392a0394f4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UsbIfIntrHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CallBackRef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>IntrStatus</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the interrupt handler for the USB mass storage device application. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is the callback reference passed from the interrupt handler, which in our case is a pointer to the driver instance. </td></tr>
    <tr><td class="paramname">IntrStatus</td><td>is a bit mask indicating pending interrupts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<p>This function is the interrupt handler for the USB mass storage device application.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is the callback reference passed from the interrupt handler, which in our case is a pointer to the driver instance. </td></tr>
    <tr><td class="paramname">IntrStatus</td><td>is a bit mask indicating pending interrupts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Each interrupt source is disabled upon reception. This is to avoid the repetitive occurrence of the same event. This is done because these event conditions exist for few milliseconds.</dd></dl>
<p>This function is the interrupt handler for the USB mass storage device application.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is the callback reference passed from the interrupt handler, which in our case is a pointer to the driver instance. </td></tr>
    <tr><td class="paramname">IntrStatus</td><td>is a bit mask indicating pending interrupts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<p>This function is the interrupt handler for the USB mass storage device application.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is the callback reference passed from to the function, which in our case is a pointer to the driver instance. </td></tr>
    <tr><td class="paramname">IntrStatus</td><td>is a bit mask indicating pending interrupts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
